<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>订单详情</title>
    <link rel="stylesheet" href="../../static/css/common/adaptor.css">
    <link rel="stylesheet" href="../../static/css/common/common.css">
    <link rel="stylesheet" href="../../static/css/me/orderDetail.css">
</head>
<body>
    <div class="layout">
        <div class="header"><span>订单详情</span>
            <div class="backArrow"></div>
        </div>
        <div class="loadingMarsk">
            <div class="loadingPic">
                <div class="rotatePic"><img src="../../static/img/1@3x.png" alt=""></div>
                <div class="centerPic"><img src="../../static/img/2@3x.png" alt=""></div>
            </div>
        </div>
        <div class="orderDetail">
            <!-- 动态渲染 -->
        </div>
        <div class="tips">订单号已经复制到剪切板</div>
    </div>
    <script type="text/template" id="orderDetail">
        <div class="orderStatus clearfix">
            <div class="productSource clearfix">
                <div class="ico"><img src="{{orderDetail.ico}}" alt=""></div>
                <span class="text">{{orderDetail.title}}</span>
            </div>
            {{if orderDetail.status===0}}
            <div class="status">待付款</div>
            {{/if}} {{if orderDetail.status===1}}
            <div class="status">已支付</div>
            {{/if}} {{if orderDetail.status===2}}
            <div class="status">待发货</div>
            {{/if}} {{if orderDetail.status===3}}
            <div class="status">待收货</div>
            {{/if}} {{if orderDetail.status===4}}
            <div class="status">待评价</div>
            {{/if}} {{if orderDetail.status===5}}
            <div class="status">已完成</div>
            {{/if}} {{if orderDetail.status===-1}}
            <div class="status">已取消</div>
            {{/if}}
        </div>
        <div class="orderMsg">
            {{if orderDetail.address.courier&&orderDetail.address.courierDate}}
            <div class="newlogistics clearfix">
                <div class="leftIcon"></div>
                <div class="center">
                    <div class="logisticsText">最新物流<span>({{orderDetail.address.courierDate}})</span></div>
                    <div class="logisticsMsg">{{orderDetail.address.courier}}</div>
                </div>
                <div class="rightIcon"></div>
            </div>
            {{/if}}
            <div class="address clearfix">
                <div class="leftIcon"></div>
                <div class="center">
                    <div class="nameAndPhone clearfix">
                        <div class="name">收货人：{{orderDetail.address.contact}}</div>
                        <div class="phone">{{orderDetail.address.mobile}}</div>
                    </div>
                    <div class="logisticsMsg">收货地址：<span>{{orderDetail.address.address}}</span></div>
                </div>
                <div class="rightIcon"></div>
            </div>
            <div class="buyMsg clearfix">
                <div class="leftIcon"></div>
                <div class="msg">
                    <div class="head">买家留言</div>
                    {{if orderDetail.message}}
                    <div class="content">{{orderDetail.message}}</div>
                    {{/if}} {{if !orderDetail.message}}
                    <div class="content">买家没有留下留言信息</div>
                    {{/if}}
                </div>
            </div>
        </div>
        <div class="productMsg">
            {{each orderDetail.list as item index}}
            <div class="productItem clearfix">
                <div class="productPic"><img src="{{item.pic}}" alt=""></div>
                <div class="productText">
                    <div class="productName">{{item.productName}}</div>
                    <div class="productSize">{{item.sku}}</div>
                    <div class="price">￥ {{item.price.toFixed(2)}}</div>
                    <div class="dcn">
                        <span class="diamond">钻石：{{item.diamond.toFixed(2)}}</span>
                        <sapn class="cash">现金：{{item.diamondPrice.toFixed(2)}}</s>
                    </div>
                </div>
                <div class="productNum">x{{item.count}}</div>
            </div>
            {{/each}}
        </div>
        {{if orderDetail.status===0}}
        <div class="pay">
            <div class="totalPay clearfix">
                <div class="typeText">商品总价</div>
                <div class="money">￥{{orderDetail.totalPrice.toFixed(2)}}</div>
            </div>
            <div class="wetChatPay clearfix">
                <div class="typeText">微信支付</div>
                <div class="money">￥{{orderDetail.needPrice.toFixed(2)}}</div>
            </div>
            <div class="redPay clearfix">
                <div class="typeText">红包支付</div>
                <div class="money">￥{{orderDetail.hongbao.toFixed(2)}}</div>
            </div>
        </div>
        {{/if}}
        <div class="orderNumAndTime">
            <div class="orderNum">订单编号：{{orderDetail.orderNo}}<span class="copyBtn" data-clipboard-text="{{orderDetail.orderNo}}">复制</span></div>
            <div class="orderTime">下单时间：{{orderDetail.createTime}}</div>
        </div>
        {{if orderDetail.status===0}}
        <div class="orderBtn clearfix">
            <div class="payBtn"><a href="javascript:void(0);">付款</a></div>
            <div class="cancleOrder"><a href="javascipt:void(0);" class="cancleOrderBtn">取消订单</a></div>
        </div>
        {{/if}} {{if orderDetail.status===3}}
        <div class="orderBtn clearfix">
            <div class="sureCatchOrder"><a href="javascript:void(0);">确认收货</a></div>
        </div>
        {{/if}} {{if orderDetail.status===4}}
        <div class="orderBtn clearfix">
            <div class="commentBtn"><a href="javascript:void(0);">商品评论</a></div>
        </div>
        {{/if}}
    </script>
    <script src="../../static/assets/jquery/jquery.min.js"></script>
    <script src="../../static/assets/fastclick/fastclick.js"></script>
    <script src="../../static/assets/art-template/template.js"></script>
    <script src="../../static/assets/clipboard/clipboard.min.js"></script>
    <script src="../../static/js/config/config.js"></script>
    <script src="../../static/js/config/tools.js"></script>
    <script src="../../static/js/me/orderDetail.js"></script>
</body>
</html>